<?php 
$customFieldHtml = "";
foreach($fields as $field){?>
    <?php $customFieldHtml .= $listingInformation->showField($listing,$field);?>
<?php }?>
<?php if(strlen($customFieldHtml)){?>
<div class = "fieldset <?php echo $fieldset['name']?>">
    <?php if($fieldset['showLabel']) {?>
    <fieldset>
      <legend><?php echo $fieldset['label']?></legend>
    <?php } ?>
    <?php echo $customFieldHtml?>
    <?php if($fieldset['showLabel']){?>
        </fieldset>
    <?php } ?>
</div>
<?php } ?>
